home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.2r / card_27260.txt < prev    next >
Text File  |  1989-02-26  |  3KB  |  75 lines

  1. -- card: 27260 from stack: in.2r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: PopUp
  6.  
  7.  
  8. -- part 2 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=246 top=26 right=50 bottom=336
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Try me...
  20. ----- HyperTalk script -----
  21. on mousedown
  22.   if the optionkey is down then edit script of me
  23.   put PopUp ("¬©1988SDrazga",128,rect of target)
  24. end mousedown
  25.  
  26.  
  27.  
  28. -- part contents for background part 5
  29. ----- text -----
  30. PopUp
  31.  
  32. -- part contents for background part 6
  33. ----- text -----
  34. I created this XFCN in response to the limitations of the original PopUp menu XFCN in the Developer Stack.  Many people have asked for a pop up menu that will display more than 255 characters.  This one will.  The larger capacity comes at a price (in terms of complexity), however.  Instead of passing the menu items to the XFCN directly, you must first create a MENU resource (using ResEdit, or some other resource creator) and pass the number of the MENU resource.  
  35. This XFCN fixes the problem with the menu location on large screens.  It also brings up the menu with less delay.
  36.  
  37. This XFCN is ¬©1988 by Steve Drazga and all rights are reserved.  It may be used in any non-commercial, shareware, or commercial stacks as long as the following conditions are met:
  38.  
  39. 1) Within the credits of the stack the phrase 
  40. "Portions ¬©1988 Steve Drazga" should be included.
  41.  
  42. 2) Send a copy of your finished stack to me at:
  43. Steve Drazga
  44. AnalytX
  45. Box 388
  46. Southampton, PA  18966
  47.  
  48. The only compensation I receive will be seeing my efforts utilitized by others.
  49.  
  50. If you need custom XCMDs/XFCNs, stacks, or HyperCard training for your organization contact Steve Drazga at AnalytX (215) 464-3733.
  51.  
  52.  
  53. -- part contents for background part 7
  54. ----- text -----
  55. Syntax:
  56.  
  57. PopUp ("¬©1988SDrazga",<resID>,<rect of target>[,<type>])
  58.  
  59.  
  60. Returns the number of the item selected (or the name if a fourth parameter is passed).
  61.  
  62. ‚Ä¢‚Ä¢Important: This must be called within a MouseDown handler!‚Ä¢‚Ä¢
  63.  
  64. The first parameter passed must be the copyright notice (the ¬© symbol is option-g).
  65.  
  66. The second parameter is the ID number of the MENU resource.
  67.  
  68. The third parameter is the rectangle of the button you are calling the XFCN from.  The menu will automatically be placed so that it lines up with bottom and left sides of the button.
  69.  
  70. If a fourth parameter is passed, the XFCN will return the name of the item selected.  Otherwise it will return the number of the item selected.
  71.  
  72.  
  73. -- part contents for background part 10
  74. ----- text -----
  75. 18